<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
						<link rel="stylesheet" href="__PUBLIC__/css/ul.css" />
		
		<style>
</style>
	</head>
	
	<body >	
	<h6><kbd>&nbsp;分类查看&nbsp;</kbd></h6>
	<a href="{:U(MODULE_NAME.'/Sort/create')}" class="btn btn-info btn-sm">新增分类</a>
	<div id="Navigate">		
	<form action="" >
						
			<ul class="headUL">
						<li>分类名称</li>
						<li>描述信息</li>
						<li>排序</li>
						<li>文章数量</li>
						<li>操作</li>
			</ul>
			<foreach name="sorts" item="s">
				<ul class="bodyYL">
						<li ><i class="glyphicon glyphicon-chevron-down pull-left"></i> {$s.name}</li>
						<li>{$s.description}</li>
						<li><kbd>{$s.number}</kbd></li>
					<li><kbd>{$s.count}</kbd></li>
						<li>
							<div class="btn-group btn-group-xs">
								<a href="{:U(MODULE_NAME.'/Sort/create',array(id=>$s['id']))}" class="btn btn-success">编辑</a>
						<a onclick="ShowDialog(this)" data-url="{:U(MODULE_NAME.'/Sort/delete',array(id=>$s['id']))}" href="javascript:void(0)" data-toggle="modal" class="btn btn-danger">删除</a>								
							</div>
						</li>
						<foreach name="s.child" item="s2">
							<ul>
						<li ><i class="glyphicon glyphicon-chevron-down pull-left"></i>{$s2.name}</li>
						<li>{$s2.description} </li>
						<li><kbd>{$s2.number}</kbd></li>
						<li><kbd>{$s2.count}</kbd></li>
								<li>
							<div class="btn-group btn-group-xs">
								<a href="{:U(MODULE_NAME.'/Sort/create',array(id=>$s2['id']))}" class="btn btn-success"> 编辑</a>
								<a onclick="ShowDialog(this)" data-url="{:U(MODULE_NAME.'/Sort/delete',array(id=>$s2['id']))}" href="javascript:void(0)" data-toggle="modal" class="btn btn-danger">删除</a>								
							</div>
								</li>
						</ul>
						
					</foreach>
				</ul>
			</foreach>
						
			
			</form></div>
	</body>		
      			  {:W('Modal/dialog',array("删除提示","你确定要删除该条分类嘛？分类下的文章将自动分配到未分类！"))}
      	<script src="__PUBLIC__/js/dialogHandle.js"></script>
      
	<script>
		$('.bodyYL .glyphicon').click(function()
		{
			$(this).parents('ul').find('ul').fadeToggle();
		})

	</script>
</html>
